In today's information age, communication networks carry vast amounts of information. Communication networks typically include various types of networking devices, such as routers and switches, that send and receive information based upon various types of routing information. The routing information is computed by the networking devices based upon various routing protocols.
A large communication network typically includes a number of sub-networks that operate somewhat independently of one another. For convenience, such a sub-network is often referred to as an autonomous system (AS). Networking devices within an AS compute internal routes based upon an internal routing protocol. Network devices at the border of each AS compute external routes based upon an external routing protocol. One such external routing protocol is commonly known as the Border Gateway Protocol (BGP). BGP is described in Rekhter et al., A Border Gateway Protocol 4 (BGP-4), Internet Engineering Task Force (IETF) Request For Comments (RFC) 1771, March 1995, which is hereby incorporated herein by reference in its entirety. A border device of an AS using BGP is often referred to as a BGP speaker.
Within BGP, a group of destinations that share some common property is referred to as a community. Each AS administrator may define the community or communities to which a particular destination belongs. A BGP speaker may use community information to control which routing information it accepts, prefers, or distributes to other neighboring border devices.
Community information may be carried within BGP packets, specifically within one or more BGP community attributes in a BGP packet. BGP community attributes are described in Chandra et al., BGP Communities Attribute, Internet Engineering Task Force (IETF) Request For Comments (RFC) 1997, August 1996, which is hereby incorporated herein by reference in its entirety. Aside from certain reserved values, a BGP communities attribute is a 32-bit value that is encoded using an AS number in the first two octets and an attribute value in the second two octets. Attribute values can be defined by the AS, and therefore the same attribute value can mean two different things in two different autonomous systems. The use of BGP communities attributes is optional. A BGP speaker can insert, modify, or replace a BGP community attribute in a BGP packet. When BGP communities attributes are used, there is no specified mechanism for placing the BGP communities attributes in the BGP packet. For example, the BGP communities attributes can be inserted, modified, or replaced differently by each BGP speaker, and multiple BGP communities attributes are not placed in the BGP packet in any particular location or order. A border device that receives a BGP packet with one or more BGP communities attributes can use the community information to make certain routing decisions.